
import Mock, { mock } from 'mockjs';
import banner from './banner.json';
import floor from './floor.json';
import address from './address.json'

// mock对象上的 mock方法可以配置以恶搞接口，并提供数据
// 参数1：接口 eg:/banner/list；参数2：请求方式； 参数3：回调函数
Mock.mock('/api/banner/list','get',()=>{
    return {
        code:200,
        message:'成功',
        data:banner
    }
})

Mock.mock('/api/floor/list','get',()=>{
    return {
        code:200,
        message:'成功',
        data:floor
    }
})

Mock.mock("/api/address/list",'get',()=>{
    return {
        code:200,
        message:'成功',
        data:address,
    }
})
